package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author: 李旭
 * @create: 2021-07-22 09:29
 **/
@FeignClient(name = "service-cart")
public interface CartFeignClient {

    //加入购物车
    @PostMapping("/api/cart/addCart/{skuId}/{skuNum}/{userId}")
    public void addCart(
            @PathVariable Long skuId,
            @PathVariable Integer skuNum
    );
    //查询购物车
    @GetMapping("/api/cart/getCartInfoBySkuId/{skuId}/{userId}")
    public CartInfo getCartInfoBySkuId(
            @PathVariable Long skuId
    );

    //商品清单
    @GetMapping("/api/cart/getCartInfoCheckedList")
    public List<CartInfo> getCartInfoCheckedList();
}
